package com.prs.crm.service.hr;

import java.io.File;
import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.jfree.data.general.AbstractDataset;

import com.prs.crm.domain.hr.Leave;
import com.prs.crm.domain.hr.LeaveType;
import com.prs.crm.domain.hr.Person;
import com.prs.crm.service.BaseService;

public interface LeaveService extends BaseService<Leave>{
	public Collection<Leave> getAllLeave();
	Collection<Leave> getLeaveByIds(Integer[] ids);
	public List<LeaveType> getAllLeaveType();
	public void saveLeave(Leave leave,File file,String fileName);
	public void saveLeaves(Leave leave,File file,String fileName);
	public Collection<Object[]> findByType(LeaveType type, Date startTime, Date endTime, Collection<Person> persons);
	public DetachedCriteria findByPage(DetachedCriteria criteria, LeaveType type, Date startTime, Date endTime, Person person);
	public Collection<Leave> findByPerson(Person person);
	public Collection<Person> convertIdsToPersons(Collection<Integer> ids);
	public AbstractDataset fillPieDataset(Collection<Object[]> leaveList);
	public AbstractDataset fillBarDataset(Collection<Object[]> leaveList);
	public Person getPerson(String series);
	Collection<Leave> getLeavesByPersonInMonth(Person person , Integer year,Integer month);
}
